package net.yla.smartbus.module.ba.right.account.service;

import com.alibaba.fastjson.JSONObject;
import net.yla.smartbus.core.base.PageBean;
import net.yla.smartbus.module.ba.right.account.dto.AccountsDTO;
import net.yla.smartbus.module.ba.right.account.entity.AccountsDO;
import net.yla.smartbus.module.ba.right.account.query.AccountOfQuery;
import net.yla.smartbus.module.ba.right.admin.dto.AdminDTO;
import net.yla.smartbus.module.ba.right.admin.entity.AdminDO;
import net.yla.smartbus.module.ba.right.admin.query.*;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @Date: 2020-08-29 11:02
 * @Author: Being Nobody
 * @Version: 1.0
 */
public interface AccountsService {


    int deleteByPrimaryKey(Integer accountId);

    int insert(AccountsDO record);

    int insertSelective(AccountsDO record);

    AccountsDO selectByPrimaryKey(Integer accountId);

    int updateByPrimaryKeySelective(AccountsDO record);

    int updateByPrimaryKey(AccountsDO record);

    AccountsDO selectByLoginId(String loginId);

    List<JSONObject> account(AdminQuery query);

    int saveSelective(AccountOfQuery query);

    int count(AdminCount query);
    //批量删除
    int deleteByList(List<Integer> accountIds);

    AccountsDO record(AdminQuery query);

    int ipOfCount(IPCount count);

    List<JSONObject> ipOfQuery(IPQuery query);

    int logOfCount(LogCount query);

    PageBean<JSONObject> logOfQuery(LogQuery query);

    JSONObject account(Integer id);

    int del(Integer id);

    JSONObject ipOfView(Integer traceId);

    JSONObject logOfView(Integer logId);

    //导出账号管理
    void  export(AdminQuery query, HttpServletResponse response);

    //导出账号日志
    void  exportLog(LogQuery query,Long ip, HttpServletResponse response);

    //删除账号日志
    int delLog(Integer id);

    //批量删除
    int deleteByLogList(List<Integer> ids);

    //查分组名
    List<JSONObject> get(AdminQuery query);


}
